<section [formGroup]="originatorAttributesConfigForm" fxLayout="column">
  <mat-checkbox fxFlex formControlName="tellFailureIfAbsent" style="padding-bottom: 8px;">
    {{ 'tb.rulenode.tell-failure-if-absent' | translate }}
  </mat-checkbox>
  <div class="tb-hint" translate>tb.rulenode.tell-failure-if-absent-hint</div>
  <label translate class="tb-title no-padding">tb.rulenode.client-attributes</label>
  <mat-form-field floatLabel="always" class="mat-block" style="padding-bottom: 16px;">
    <mat-label></mat-label>
    <mat-chip-list #clientAttributesChipList>
      <mat-chip
        *ngFor="let key of originatorAttributesConfigForm.get('clientAttributeNames').value;"
        (removed)="removeKey(key, 'clientAttributeNames')">
        {{key}}
        <mat-icon matChipRemove>close</mat-icon>
      </mat-chip>
      <input matInput type="text" placeholder="{{'tb.rulenode.client-attributes' | translate}}"
             style="max-width: 200px;"
             [matChipInputFor]="clientAttributesChipList"
             [matChipInputSeparatorKeyCodes]="separatorKeysCodes"
             (matChipInputTokenEnd)="addKey($event, 'clientAttributeNames')"
             [matChipInputAddOnBlur]="true">
    </mat-chip-list>
    <mat-hint [innerHTML]="'tb.rulenode.general-pattern-hint' | translate | safeHtml"></mat-hint>
  </mat-form-field>
  <label translate class="tb-title no-padding">tb.rulenode.shared-attributes</label>
  <mat-form-field floatLabel="always" class="mat-block" style="padding-bottom: 16px;">
    <mat-label></mat-label>
    <mat-chip-list #sharedAttributesChipList>
      <mat-chip
        *ngFor="let key of originatorAttributesConfigForm.get('sharedAttributeNames').value;"
        (removed)="removeKey(key, 'sharedAttributeNames')">
        {{key}}
        <mat-icon matChipRemove>close</mat-icon>
      </mat-chip>
      <input matInput type="text" placeholder="{{'tb.rulenode.shared-attributes' | translate}}"
             style="max-width: 200px;"
             [matChipInputFor]="sharedAttributesChipList"
             [matChipInputSeparatorKeyCodes]="separatorKeysCodes"
             (matChipInputTokenEnd)="addKey($event, 'sharedAttributeNames')"
             [matChipInputAddOnBlur]="true">
    </mat-chip-list>
    <mat-hint [innerHTML]="'tb.rulenode.general-pattern-hint' | translate | safeHtml"></mat-hint>
  </mat-form-field>
  <label translate class="tb-title no-padding">tb.rulenode.server-attributes</label>
  <mat-form-field floatLabel="always" class="mat-block" style="padding-bottom: 16px;">
    <mat-label></mat-label>
    <mat-chip-list #serverAttributesChipList>
      <mat-chip
        *ngFor="let key of originatorAttributesConfigForm.get('serverAttributeNames').value;"
        (removed)="removeKey(key, 'serverAttributeNames')">
        {{key}}
        <mat-icon matChipRemove>close</mat-icon>
      </mat-chip>
      <input matInput type="text" placeholder="{{'tb.rulenode.server-attributes' | translate}}"
             style="max-width: 200px;"
             [matChipInputFor]="serverAttributesChipList"
             [matChipInputSeparatorKeyCodes]="separatorKeysCodes"
             (matChipInputTokenEnd)="addKey($event, 'serverAttributeNames')"
             [matChipInputAddOnBlur]="true">
    </mat-chip-list>
    <mat-hint [innerHTML]="'tb.rulenode.general-pattern-hint' | translate | safeHtml"></mat-hint>
  </mat-form-field>
  <label translate class="tb-title no-padding">tb.rulenode.latest-timeseries</label>
  <mat-form-field floatLabel="always" class="mat-block" style="padding-bottom: 16px;">
    <mat-label></mat-label>
    <mat-chip-list #latestTimeseriesChipList>
      <mat-chip
        *ngFor="let key of originatorAttributesConfigForm.get('latestTsKeyNames').value;"
        (removed)="removeKey(key, 'latestTsKeyNames')">
        {{key}}
        <mat-icon matChipRemove>close</mat-icon>
      </mat-chip>
      <input matInput type="text" placeholder="{{'tb.rulenode.latest-timeseries' | translate}}"
             style="max-width: 200px;"
             [matChipInputFor]="latestTimeseriesChipList"
             [matChipInputSeparatorKeyCodes]="separatorKeysCodes"
             (matChipInputTokenEnd)="addKey($event, 'latestTsKeyNames')"
             [matChipInputAddOnBlur]="true">
    </mat-chip-list>
    <mat-hint [innerHTML]="'tb.rulenode.general-pattern-hint' | translate | safeHtml"></mat-hint>
  </mat-form-field>
  <mat-checkbox formControlName="getLatestValueWithTs" style="padding-bottom: 8px;">
    {{ 'tb.rulenode.get-latest-value-with-ts' | translate }}
  </mat-checkbox>
  <div class="tb-hint" [innerHTML]="'tb.rulenode.get-latest-value-with-ts-hint' | translate | safeHtml"></div>
</section>
